import { getSingerDetail } from '@/api/singer'
import { processSongs } from '@/api/song'

async function useApi(params, songListRef) {
  const res = await getSingerDetail({ mid: params.id })
  const songsWithUrl = await processSongs(res.result.songs)
  songListRef.value = songsWithUrl
  return { songListRef }
}

export default useApi
